package com.example.crm.service.Imp;


import com.example.crm.entity.User;
import com.example.crm.mapper.UserMapper;
import com.example.crm.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImp implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public User findNameAndPassword(String userName, String userPassword) {
        return userMapper.findNameAndPassword(userName,userPassword);
    }

    @Override
    public List<User> finAll() {
    return userMapper.finAll();
    }

    @Override
    public User findByName(String name) {
        return userMapper.findByName(name);
    }
}
